package cums.logic.impl;

import cums.db.iface.CuseventDao;
import cums.db.iface.CusgrpDao;
import cums.db.iface.CuspropDao;
import cums.db.iface.CustomersDao;
import cums.db.iface.GroupsDao;
import cums.db.iface.PropdetailDao;
import cums.db.iface.PropertiesDao;
import cums.db.pers.Cusevent;
import cums.db.pers.Cusgrp;
import cums.db.pers.Cusprop;
import cums.db.pers.Customers;
import cums.db.pers.Groups;
import cums.db.pers.Propdetail;
import cums.db.pers.Properties;
import cums.logic.iface.CustomerService;
import java.util.List;

/**
 * @time Dec 10, 2009, 2:57:55 AM
 * @author fdcube
 */
public class CustomerServiceImpl implements CustomerService {

    private CustomersDao customersDao;
    private CuseventDao cuseventDao;
    private CusgrpDao cusgrpDao;
    private GroupsDao groupsDao;
    private PropertiesDao propertiesDao;
    private PropdetailDao propdetailDao;
    private CuspropDao cuspropDao;

    public void setCuspropDao(CuspropDao cuspropDao) {
        this.cuspropDao = cuspropDao;
    }


    public void setPropdetailDao(PropdetailDao propdetailDao) {
        this.propdetailDao = propdetailDao;
    }

    public void setPropertiesDao(PropertiesDao propertiesDao) {
        this.propertiesDao = propertiesDao;
    }


    public void setGroupsDao(GroupsDao groupsDao) {
        this.groupsDao = groupsDao;
    }
    
    public void setCusgrpDao(CusgrpDao cusgrpDao) {
        this.cusgrpDao = cusgrpDao;
    }
    

    public void setCustomersDao(CustomersDao customersDao) {
        this.customersDao = customersDao;
    }

    public void setCuseventDao(CuseventDao cuseventDao) {
        this.cuseventDao = cuseventDao;
    }

    public Customers AddOrUpdateCus(Customers value) {
        return customersDao.AddOrUpdateCustomers(value);
    }

    public boolean DeleteCus(Customers value) {
        return customersDao.DeleteCustomers(value);
    }

    public Cusevent AddOrUpdateCue(Cusevent value) {
        return cuseventDao.AddOrUpdateCusevent(value);
    }

    public boolean DeleteCue(Cusevent value) {
        return cuseventDao.DeleteCusevent(value);
    }

    public List<Customers> ListCustomersByUid(int page, int uid) {
        return customersDao.ShowCustomersByUid(page, uid);
    }

    public List<Customers> ListCustomersByGid(int page, int gid, int uid) {
        return customersDao.ShowCustomersByGid(page, gid, uid);
    }

    public Cusgrp AddOrUpdateCusg(Cusgrp value) {
        return cusgrpDao.AddOrUpdateCusgrp(value);
    }

    public Groups AddOrUpdateGroup(Groups value) {
        return groupsDao.AddOrUpdateGroups(value);
    }

    public Properties AddOrUpdateProp(Properties value) {
        return propertiesDao.AddorUpdateProperties(value);
    }

    public Propdetail AddOrUpdatePropDet(Propdetail value) {
        return propdetailDao.AddOrUpdatePropdetail(value);
    }

    public Cusprop AddOrUpdateCusprop(Cusprop value) {
        return cuspropDao.AddOrUpdateCusprop(value);
    }
}
